package com.xjscrm.common.enums;

/**
 * 好友请求状态枚举
 * @Auther: liuqi
 * @Date: 2021/8/19 11:22
 * @Description:
 */
public enum FriendReqStatusEnum {


    HANDING(0,"处理中"),
    PASSED(1,"已通过"),
    IGNORE(2,"已忽略"),
    NOTPASSED (3,"未通过"),


    ;

    private Integer id;
    private String desc;

    FriendReqStatusEnum(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static FriendReqStatusEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (FriendReqStatusEnum type: FriendReqStatusEnum.values()) {
            if (type.getId().intValue() == id.intValue()) {
                return type;
            }
        }
        return null;
    }
}
